<!DOCTYPE html>
<html lang="en">
<head>
    <{include file="header.html"}>
    <title>组卷管理-<{$user_data['school_name']}>-德安信会计在线教育平台</title>
</head>
<body>
<div class="wrap">
    <!--star left-->
    <div class="column">
        <{include file="user/left_menu.html"}>
    </div>
    <div id="ContMianBox">
        <!--star子栏目-->
        <div class="sub-colum">
                <div class="tit">教务管理</div>
                <ul>
                    <li><a href="/user/classes">我的班级</a></li>
                    <li><a href="/user/class_time">我的课程表</a></li>
                    <li <{if $type == 3}>class="curr"<{/if}>><a href="/user/classes/volume_list/3">我的作业</a></li>
                    <li <{if $type == 4}>class="curr"<{/if}>><a href="/user/classes/volume_list/4">我的考试</a></li>
                </ul>
            </div>
        <!--end子栏目-->
        <!--end left-->
        <div class="container narrow">
            <!--star conter-->
            <div class="cetContent">
                <div class="tit p-lr20">
                    <span class="curr"><{if $type == 3}>作业<{else}>考试<{/if}>记录</span>
                </div>
                <!--star内容区域-->
                <div class="mainScroll">
                    <div class="mainContainer line-all">
                        <!--star tabMainCont-->
                        <div class="tabMainCont">
                            <!--star会员管理-->
                            <fieldset class="layui-elem-field">
                                <legend>筛选</legend>
                                <div class="layui-field-box">
                                    <form class="layui-form layui-form-pane1" method="post" action="/classes/home_work_historys">
                                        <div class="layui-form-item">
                                        	<input type="hidden" name="home_work_id" value="<{$conditions.home_work_id|default:0}>"/>
                                            <div class="layui-inline">
                                                <input type="text" class="layui-input" style="width:200px;" placeholder="学员姓名" value="<{if  $conditions.name != 0}><{$conditions.name}><{/if}>"  name="name" />
                                            </div>

                                            <div class="layui-inline">
                                                <button type="submit" class="layui-btn">搜索</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </fieldset>
                            <table class="layui-table" lay-even lay-skin="row">
                                <thead>
                                    <tr>
                                        <th>学员</th>
                                        <th>成绩</th>
                                        <th>交卷时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <{foreach from=$history_list item=item}>
                                    <tr>
                                        <td class="tal not_lb"><{$item.name}></td>
                                        <td class="tal not_lb"><{$item.fraction}></td>
                                        <td class="tal not_lb">
                                        <{if $item.status == 1}>
                                        <{$item.end_time|date_format: '%Y-%m-%d <br/> %H:%M'}>
                                        <{else}>
                                        未交卷
                                        <{/if}>
                                        </td>
                                        <td class="tal not_lb">
                                            <div class="colorBtn">
                                            	<p><a class="c-3283fa" href="/user/classes/show_volume/<{$item.id}>/<{$conditions.type}>">查看答卷</a></p>
                                            </div>
                                        </td>
                                    </tr>
                                <{/foreach}>
                            </table>
                            <div class="pages p-tb20" style="text-align:right;">
                                <!-- <div class="l">
                                    <a href="javascript:;" class="zent-btn">你想要的按钮</a>
                                </div> -->
                                <{$pagination}>
                            </div>

                        </div>
                        <!--star会员管理-->
                    </div>
                    <!--end tabMainCont-->
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['form', 'jquery', 'layedit'], function(){
        var layedit = layui.layedit,form = layui.form(),$ = layui.jquery;
        $(".publish").click(function(){
            var _this = $(this);
            var volume_id = $(this).attr("volume_id");
            var type = $(this).attr("publish_type");
            layer.prompt({title: '请输入该试卷的答题时长（单位：分钟）', formType: 3}, function(text, index){
                if(isNaN(text)){
                    layer.msg("时长必须是数字！", {icon:5, anim: 6});
                    return false;
                }
                layer.close(index);
                $.ajax({
                    type: "POST",
                    url: "/tiku/publish_volume",
                    dataType:"json",
                    data:{'type':type,'volume_id':volume_id, 'timeout':text},
                    success: function(result){
                        // layer.close(ii);
                        if(result.error == 0){
                            layer.msg(result.msg, {icon:6});
                            _this.text(result.msg);
                            _this.unbind("click");
                        }else{
                            layer.msg(result.msg, {icon:5});
                        }
                    }
                });
            });
        })
        
    });
</script>
</body>
</html>
